import pandas as pd
df = pd.read_csv('Ecommerce Purchases')
df.columns
Index(['6534.10.5"', 'Mckinney-Gonzalez', '869957209729483', '02/25', '160', 'Mastercard', 'david75@miller.biz', 'Production assistant, television', '211.51.146.20', 'de', '80.53'], dtype='object')
df.head()
6534.10.5" | Mckinney-Gonzalez | 869957209729483 | 02/25 | 160 | Mastercard | david75@miller.biz | Production assistant, television | 211.51.146.20 | de | 80.53 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PSC 3524, Box 9417\nAPO AA 09217-2597 | 77 oq | PM | Mozilla/5.0 (X11; Linux x86_64; rv:1.9.5.20) G... | Rodriguez Ltd | 210029157389946 | 07/22 | 956 | Voyager | amber18@gmail.com | Therapist, art | 240.0.241.47 | es | 4.81 |
Unit 2512 Box 3240\nDPO AE 73264-2823 | 34 bB | AM | Opera/9.33.(X11; Linux x86_64; en-US) Presto/2... | Schneider and Sons | 210023579873538 | 12/21 | 336 | VISA 13 digit | pjuarez@fisher-burns.net | Fine artist | 122.180.112.221 | el | 55.30 |
Unit 2807 Box 1152\nDPO AE 90364-7161 | 69 GO | AM | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6... | Price Ltd | 3337549391700444 | 09/21 | 979 | VISA 16 digit | johnsonmaria@jackson-hernandez.biz | Learning mentor | 67.28.45.167 | el | 89.63 |
524 Hill Track Apt. 980\nSandrahaven, GA 68830-0916 | 52 ss | AM | Mozilla/5.0 (Windows; U; Windows NT 5.2) Apple... | Irwin-Frost | 6011932554425502 | 03/26 | 832 | Diners Club / Carte Blanche | hoffmanperry@yahoo.com | Seismic interpreter | 230.103.41.76 | de | 48.62 |
461 William Route Apt. 914\nCoxport, MD 74117 | 27 EA | AM | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_7)... | Smith Inc | 4206301309941629 | 09/16 | 136 | Maestro | stevemyers@hotmail.com | Engineer, civil (contracting) | 248.147.6.166 | ru | 61.83 |
df.tail(3)
6534.10.5" | Mckinney-Gonzalez | 869957209729483 | 02/25 | 160 | Mastercard | david75@miller.biz | Production assistant, television | 211.51.146.20 | de | 80.53 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unit 4434 Box 6343\nDPO AE 28026-0283 | 74 Zh | AM | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7... | Anderson Ltd | 6011539787356311 | 05/21 | 1 | VISA 16 digit | tyler16@gmail.com | Veterinary surgeon | 156.210.0.254 | el | 83.98 |
0096 English Rest\nRoystad, IA 12457 | 74 cL | PM | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_8;... | Cook Inc | 180003348082930 | 11/17 | 987 | American Express | elizabethmoore@reid.net | Local government officer | 55.78.26.143 | es | 38.84 |
40674 Barrett Stravenue\nGrimesville, WI 79682 | 64 Hr | AM | Mozilla/5.0 (X11; Linux i686; rv:1.9.5.20) Gec... | Greene Inc | 4139972901927273 | 02/19 | 302 | JCB 15 digit | rachelford@vaughn.com | Embryologist, clinical | 176.119.198.199 | el | 67.59 |
df.dtypes
6534.10.5" object Mckinney-Gonzalez object 869957209729483 int64 02/25 object 160 int64 Mastercard object david75@miller.biz object Production assistant, television object 211.51.146.20 object de object 80.53 float64 dtype: object
df.isnull().sum()
6534.10.5" 0 Mckinney-Gonzalez 0 869957209729483 0 02/25 0 160 0 Mastercard 0 david75@miller.biz 0 Production assistant, television 0 211.51.146.20 0 de 0 80.53 0 dtype: int64
df.shape
(2363, 11)
df['160'].max()
9989
df['160'].idxmax()
('88305 Eileen Prairie\nLake Michellechester, NC 56239', '90 KU', 'PM')
df['160'].idxmin()
('PSC 6610, Box 2871\nAPO AE 39171-6454', '80 Kd', 'AM')
df['160'].min()
0
df['160'].mean()
942.6517139229793
(df['de'] == 'fr').sum()
224
len(df[(df['Mastercard'] == 'Mastercard') & (df['160'] > 50)])
173